@extends('admin/layout/index')

@section('css')
	<link rel="stylesheet" href="/d/css/page_page.css">
@endsection

@section('title')
	用户列表
@endsection

@section('content')
	<div class="mws-panel grid_8">
    	<div class="mws-panel-header">
        	<span><i class="icon-list"></i>用户列表页面</span>
        </div>
        <div class="mws-panel-body no-padding">
            <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">
		            <div id="DataTables_Table_1_length" class="dataTables_length">
            			<form action="/admin/user/index" method="get">
			            <label>显示 
				            <select size="1" name="count" aria-controls="DataTables_Table_1">
					            <option value="10" @if(!empty($request['count']) && $request['count'] == 10) selected @endif>10</option>
					            <option value="25" @if(!empty($request['count']) && $request['count'] == 25) selected @endif>25</option>
					            <option value="50" @if(!empty($request['count']) && $request['count'] == 50) selected @endif>50</option>
					            <option value="100" @if(!empty($request['count']) && $request['count'] == 100) selected @endif>100</option>
				            </select>
			            条</label>
		            </div>
		            <div class="dataTables_filter" id="DataTables_Table_1_filter">
			            <label>搜索: 
			            	<input type="text" aria-controls="DataTables_Table_1" name="search" value="{{$request['search'] or ''}}">
			            </label>
			            <input type="submit" value="提交">
	            	</form>
		            </div>
	            <table border="1" class="mws-datatable-fn mws-table dataTable">
	                <thead>
	                    <tr role="row">
		                    <th class="sorting_asc">ID</th>
		                    <th class="sorting">用户名</th>
		                    <th class="sorting">年龄</th>
		                    <th class="sorting">性别</th>
		                    <th class="sorting">邮箱</th>
		                    <th class="sorting">createTime</th>
		                    <th class="sorting">操作</th>
	     
	                </thead>
		            <tbody role="alert" aria-live="polite" aria-relevant="all">
		            	@foreach($data as $k => $v)
			    		<tr class="odd">
			                <td class=" sorting_1">{{$v['h_uid']}}</td>
			                <td class=" ">{{$v['username']}}</td>
			                <td class=" ">{{$v['age']}}</td>
			                <td class=" ">{{$v['sex']}}</td>
			                <td class=" ">{{$v['email']}}</td>
			                <td class=" ">{{$v['createTime']}}</td>
			                <td class=" " style="text-align:center;">
			                	<a href="/admin/user/delete/{{$v['h_uid']}}"><i class="icon-trash" style="font-size:20px;color:black"></i></a>　
			                	<a href="/admin/user/edit/{{$v['h_uid']}}"><i class="icon-pencil-2" style="font-size:20px;color:black"></i></a>
			                </td>
			            </tr>
			            @endforeach
			        </tbody>
			    </table>
			    <div>
				    <div class="dataTables_info" id="DataTables_Table_1_info">Showing 1 to 10 of 57 entries</div>
				    <!-- <div class="dataTables_paginate paging_full_numbers" id="DataTables_Table_1_paginate">
				    	<a tabindex="0" class="first paginate_button paginate_button_disabled" id="DataTables_Table_1_first">First</a>
					    <a tabindex="0" class="previous paginate_button paginate_button_disabled" id="DataTables_Table_1_previous">Previous</a>
					    <span>
						    <a tabindex="0" class="paginate_active">1</a>
						    <a tabindex="0" class="paginate_button">2</a>
						    <a tabindex="0" class="paginate_button">3</a>
						    <a tabindex="0" class="paginate_button">4</a>
						    <a tabindex="0" class="paginate_button">5</a>
					    </span>
					    <a tabindex="0" class="next paginate_button" id="DataTables_Table_1_next">Next</a>
					    <a tabindex="0" class="last paginate_button" id="DataTables_Table_1_last">Last</a>
					    
				    </div> -->
				    <div class="dataTables_paginate paging_full_numbers" id="page_page">
					{!! $data->appends($request)->render() !!}
					</div>
				</div>
		    </div>
        </div>
    </div>
@endsection